class People {
    constructor(name,age) {
        this.name = name;
        this.age = age;
    }
    say() {
        console.log('你好');
    }
}

class Peo1 extends People{
    constructor(name,age) {
        // 相当于调用了父类中的构造器,super()必须放在第一个位置
        super(name,age)
    }
}
class Peo2 extends People{
    constructor(name,age,id) {
        // 相当于调用了父类中的构造器,super()必须放在第一个位置
        super(name,age)
        //创建独有的实例属性
        this.id = id;
    }
}
let peo1 = new Peo1('赵丽文',100)
console.log(peo1);
peo1.say()

let peo2 = new Peo2('赵丽文ee',1000990900,"身份证")
console.log(peo2);
peo2.say()